package model

import (
	"time"
)

type HoldMethod struct {
}

func (h *HoldMethod) Pay(pc *Paycheck) {
	pc.SetField("Disposition", "Hold")
}

type SalariedClassification struct {
	Salary float64
}

func (s *SalariedClassification) CalculatePay(pc *Paycheck) float64 {
	return s.Salary
}

type NoAffiliation struct {
}

func (naf *NoAffiliation) CalculateDeductions(pc *Paycheck) float64 {
	return .0
}

type WeeklySchedule struct {
}

func (w *WeeklySchedule) IsPayDate(t time.Time) bool {
	return t.Weekday() == time.Friday
}

func (w *WeeklySchedule) GetPayPeriodStartDate(t time.Time) time.Time {
	return t.AddDate(0, 0, -6)
}
